--- @class WIFI
local wifiApi = {
    _mode = wifi.STATIONAP,
    _aid = nil,
    _apd = nil,
    _pid = nil,
    _ppd = nil
}
function wifiApi:setModel()
  wifi.setmode(self._mode)
end
---@param ssid string
---@param pwd string
function wifiApi:connectWIFIByName(ssid, pwd)
  self._aid = ssid
  self._apd = pwd
  wifi.sta.config({ssid = self._aid, pwd = self._apd})
  wifi.sta.connect()
end
function wifiApi:autoConnect()
  wifi.sta.autoconnect(1)
end
function wifiApi:disConnect()
  wifi.sta.disconnect()
end
--- @return string
function wifiApi:getStaIp()
  return wifi.sta.getip()
end
--- @return table<string, string>
function wifiApi:getWifiList()
  return wifi.sta.getap()
end
--- @return number
function wifiApi:getStatus()
  return wifi.sta.status()
end
--- @return string
function wifiApi:getApIp()
  return wifi.ap.getip()
end

function wifiApi:udpReceiveListener(socket, data, port, ip)

end


return wifiApi
